//
//  platformConfiguartion.h
//  Version1.0_RectiveCocoa
//
//  Created by 吴可高 on 2018/1/20.
//  Copyright © 2018年 吴可高. All rights reserved.
//

#ifndef platformConfiguartion_h
#define platformConfiguartion_h

#define KScreenWidth [[UIScreen mainScreen] bounds].size.width
#define KScreenHeight [[UIScreen mainScreen] bounds].size.height
#define kNavigationBarHeight 64
#define UIColorFromRGB(rgbValue) \
    [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
    green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
    blue:((float)(rgbValue & 0xFF))/255.0 \
    alpha:(float)1.0]

#ifdef  DEBUG
#define __NSLog(format, ...) do {      \
fprintf(stderr,"===================\n");\
fprintf(stderr,"{[%s : %d]\n %s}\n" ,\
[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, __func__);\
NSLog((format),##__VA_ARGS__);  \
fprintf(stderr,"===================\n");\
} while ( 0 )
#else
#define __NSLog(...)
#endif


// Rect Size Point
#define  __NSLogRect(rect) __NSLog(@"%s x:%.4f, y:%.4f, w:%.4f, h:%.4f", #rect, CGRectGetMinX(rect), CGRectGetMinY(rect), CGRectGetWidth(rect), CGRectGetHeight(rect))

#define  __NSLogSize(size)  __NSLog(@"%s w:%.4f, h:%.4f", #size, size.width, size.height)

#define  __NSLogPoint(point) __NSLog(@"%s x:%.4f, y:%.4f", #point, point.x, point.y)


#endif /* platformConfiguartion_h */
